<script setup lang="ts">
import { RouterView, RouterLink } from 'vue-router';
</script>

<template>
  <div class="app-container">
    <nav class="main-nav">
      <RouterLink to="/users" class="nav-link">用户管理</RouterLink>
      <RouterLink to="/roles" class="nav-link">角色管理</RouterLink>
      <RouterLink to="/menus" class="nav-link">菜单管理</RouterLink>
    </nav>
    <main class="content-area">
      <RouterView />
    </main>
  </div>
</template>

<style>

html, body {
  height: 100vh;
  overflow: hidden;
}

.app-container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.main-nav {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background-color: #f5f5f5;
}

.nav-link {
  text-decoration: none;
  color: #333;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

.nav-link:hover {
  background-color: #e0e0e0;
}

.nav-link.router-link-exact-active {
  background-color: #42b983;
  color: white;
}

.content-area {
  flex: 1;
  overflow: auto;
  padding: 1rem;
  min-height: 0;
}
</style>
